/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package x.minigame1;
// this will include all events
import java.awt.event.*;
import java.awt.image.BufferStrategy;
import java.io.IOException;
import java.net.URL;
import java.awt.*;
import javax.swing.*;
import javax.imageio.ImageIO;
import java.io.IOException;
import java.net.URL;
import javax.swing.*;
import java.awt.GridLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.event.MouseListener;
import java.awt.event.MouseEvent;
import javax.imageio.ImageIO;
import java.awt.*;
import java.util.*;
import java.awt.image.BufferStrategy;
/**
 *
 * @author Omar
 */
//--------------------------------------------------------------------
//class level is the equivalent of map.java

public class level{
    
        //bottle means there is a bottle at the specified location
        private static final int CLEAR = 1;
        private static final int BOTTLE = 2;
      

        //level size info
        public static final int WIDTH = 84; //64
        public static final int HEIGHT = 68; //48
        public static final int TILE_SIZE = 10;
   

      
        /** The actual data for our map */
        private int[][] grid = new int[WIDTH][HEIGHT];


    public level (){

                for (int y=0;y<HEIGHT;y++)
                {
                    for (int x = 0; x < WIDTH; x++)
                    {
                        grid[x][y] = CLEAR;

                   
                    }
                }



    }

   public void set(int x, int y)
    {
       grid[x][y] = BOTTLE;

   }

    //paint function
         public void paint(Graphics2D g) {
                for (int x=0;x<WIDTH;x++) {
                        for (int y=0;y<HEIGHT;y++) {
                                                                   
g.setColor(Color.green);
                                  // if(grid[x][y] == BOTTLE);
                                    //    g.setColor(Color.BLUE);

                                       //  if (grid[x][y] == CLEAR)
                                       // g.setColor(Color.white);

                                // draw the rectangle with a dark outline
                                g.fillRect(x*TILE_SIZE,y*TILE_SIZE,TILE_SIZE,TILE_SIZE);
                                g.setColor(g.getColor().darker());
                             
                            
                               // g.drawRect(x*TILE_SIZE,y*TILE_SIZE,TILE_SIZE,TILE_SIZE);
                        }
                }




}


}

